#ifndef CSocketClient_HPP
#define CSocketClient_HPP

// System includes

// Other includes
#include "CObservable.hpp"

class CCommand;
class CObserver;

class CSocketClient : public CObservable
{
public:
   /**
    * @brief Default constructor
    */
   CSocketClient(const int port, CObserver* pObserver);

   /**
    * @brief Starts server:
    *        Opens connection
    *        If successfully connected, starts reading commands from it
    */
   void start();

   void sendCommand(CCommand cmd);

   bool isConnected();
   
   ~CSocketClient();
protected:

private:
   const int mPort;
   int mSock;
};

#endif // CSocketClient_HPP